﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 货品信息基础输入参数
/// </summary>
public class CommodityinformationBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 货品名称
    /// </summary>
    public virtual string? ItemName { get; set; }
    
    /// <summary>
    /// 货品编号
    /// </summary>
    public virtual string? ItemCode { get; set; }
    
    /// <summary>
    /// 货品类型
    /// </summary>
    public virtual long? GoodsID { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    public virtual string? Specifications { get; set; }
    
    /// <summary>
    /// 入库参考价/元
    /// </summary>
    public virtual decimal? EnterPrice { get; set; }
    
    /// <summary>
    /// 出库参考价/元
    /// </summary>
    public virtual decimal? GooutPrice { get; set; }
    
    /// <summary>
    /// 显示顺序
    /// </summary>
    public virtual int? DisplayOrder { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public virtual bool? State { get; set; }
    
    /// <summary>
    /// 保质期管理
    /// </summary>
    public virtual bool? ShelfManagement { get; set; }
    
    /// <summary>
    /// 保质期
    /// </summary>
    public virtual int? Shelflife { get; set; }
    
    /// <summary>
    /// 保质期单位
    /// </summary>
    public virtual string? ShelfUnits { get; set; }
    
    /// <summary>
    /// 预警天数（天）
    /// </summary>
    public virtual int? Earlywarning { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 启用多单位
    /// </summary>
    public virtual bool? MultiUnitEnabled { get; set; }
    
    /// <summary>
    /// 主单位
    /// </summary>
    public virtual long? Primaryunit { get; set; }
    
    /// <summary>
    /// 条码
    /// </summary>
    public virtual string? PrimaryunitBarcode { get; set; }
    
    /// <summary>
    /// 辅助单位
    /// </summary>
    public virtual string? AuxiliaryUnits { get; set; }
    
    /// <summary>
    /// 库存信息
    /// </summary>
    public virtual string? InventoryList { get; set; }
    
    /// <summary>
    /// 上传图片
    /// </summary>
    public virtual string? UploadImage { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public virtual string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [Required(ErrorMessage = "客户名称不能为空")]
    public virtual long? UserID { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    [Required(ErrorMessage = "供应商不能为空")]
    public virtual long? VendorID { get; set; }
    
}

/// <summary>
/// 货品信息分页查询输入参数
/// </summary>
public class PageCommodityinformationInput : BasePageInput
{
    /// <summary>
    /// 货品名称
    /// </summary>
    public string? ItemName { get; set; }
    
    /// <summary>
    /// 货品编号
    /// </summary>
    public string? ItemCode { get; set; }
    
    /// <summary>
    /// 货品类型
    /// </summary>
    public long? GoodsID { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    public string? Specifications { get; set; }
    
    /// <summary>
    /// 入库参考价/元
    /// </summary>
    public decimal? EnterPrice { get; set; }
    
    /// <summary>
    /// 出库参考价/元
    /// </summary>
    public decimal? GooutPrice { get; set; }
    
    /// <summary>
    /// 显示顺序
    /// </summary>
    public int? DisplayOrder { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? State { get; set; }
    
    /// <summary>
    /// 保质期管理
    /// </summary>
    public bool? ShelfManagement { get; set; }
    
    /// <summary>
    /// 保质期
    /// </summary>
    public int? Shelflife { get; set; }
    
    /// <summary>
    /// 保质期单位
    /// </summary>
    public string? ShelfUnits { get; set; }
    
    /// <summary>
    /// 预警天数（天）
    /// </summary>
    public int? Earlywarning { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 启用多单位
    /// </summary>
    public bool? MultiUnitEnabled { get; set; }
    
    /// <summary>
    /// 主单位
    /// </summary>
    public long? Primaryunit { get; set; }
    
    /// <summary>
    /// 条码
    /// </summary>
    public string? PrimaryunitBarcode { get; set; }
    
    /// <summary>
    /// 辅助单位
    /// </summary>
    public string? AuxiliaryUnits { get; set; }
    
    /// <summary>
    /// 库存信息
    /// </summary>
    public string? InventoryList { get; set; }
    
    /// <summary>
    /// 上传图片
    /// </summary>
    public string? UploadImage { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? UserID { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public long? VendorID { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 货品信息增加输入参数
/// </summary>
public class AddCommodityinformationInput
{
    /// <summary>
    /// 货品名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "货品名称字符长度不能超过32")]
    public string? ItemName { get; set; }
    
    /// <summary>
    /// 货品编号
    /// </summary>
    [MaxLength(32, ErrorMessage = "货品编号字符长度不能超过32")]
    public string? ItemCode { get; set; }
    
    /// <summary>
    /// 货品类型
    /// </summary>
    public long? GoodsID { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? Specifications { get; set; }
    
    /// <summary>
    /// 入库参考价/元
    /// </summary>
    public decimal? EnterPrice { get; set; }
    
    /// <summary>
    /// 出库参考价/元
    /// </summary>
    public decimal? GooutPrice { get; set; }
    
    /// <summary>
    /// 显示顺序
    /// </summary>
    public int? DisplayOrder { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? State { get; set; }
    
    /// <summary>
    /// 保质期管理
    /// </summary>
    public bool? ShelfManagement { get; set; }
    
    /// <summary>
    /// 保质期
    /// </summary>
    public int? Shelflife { get; set; }
    
    /// <summary>
    /// 保质期单位
    /// </summary>
    [MaxLength(32, ErrorMessage = "保质期单位字符长度不能超过32")]
    public string? ShelfUnits { get; set; }
    
    /// <summary>
    /// 预警天数（天）
    /// </summary>
    public int? Earlywarning { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 启用多单位
    /// </summary>
    public bool? MultiUnitEnabled { get; set; }
    
    /// <summary>
    /// 主单位
    /// </summary>
    public long? Primaryunit { get; set; }
    
    /// <summary>
    /// 条码
    /// </summary>
    [MaxLength(32, ErrorMessage = "条码字符长度不能超过32")]
    public string? PrimaryunitBarcode { get; set; }
    
    /// <summary>
    /// 辅助单位
    /// </summary>
    [MaxLength(1000, ErrorMessage = "辅助单位字符长度不能超过1000")]
    public string? AuxiliaryUnits { get; set; }
    
    /// <summary>
    /// 库存信息
    /// </summary>
    [MaxLength(1000, ErrorMessage = "库存信息字符长度不能超过1000")]
    public string? InventoryList { get; set; }
    
    /// <summary>
    /// 上传图片
    /// </summary>
    [MaxLength(2000, ErrorMessage = "上传图片字符长度不能超过2000")]
    public string? UploadImage { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [MaxLength(2000, ErrorMessage = "上传附件字符长度不能超过2000")]
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [Required(ErrorMessage = "客户名称不能为空")]
    public long? UserID { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    [Required(ErrorMessage = "供应商不能为空")]
    public long? VendorID { get; set; }
    
}

/// <summary>
/// 货品信息删除输入参数
/// </summary>
public class DeleteCommodityinformationInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 货品信息更新输入参数
/// </summary>
public class UpdateCommodityinformationInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 货品名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "货品名称字符长度不能超过32")]
    public string? ItemName { get; set; }
    
    /// <summary>
    /// 货品编号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "货品编号字符长度不能超过32")]
    public string? ItemCode { get; set; }
    
    /// <summary>
    /// 货品类型
    /// </summary>    
    public long? GoodsID { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? Specifications { get; set; }
    
    /// <summary>
    /// 入库参考价/元
    /// </summary>    
    public decimal? EnterPrice { get; set; }
    
    /// <summary>
    /// 出库参考价/元
    /// </summary>    
    public decimal? GooutPrice { get; set; }
    
    /// <summary>
    /// 显示顺序
    /// </summary>    
    public int? DisplayOrder { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    public bool? State { get; set; }
    
    /// <summary>
    /// 保质期管理
    /// </summary>    
    public bool? ShelfManagement { get; set; }
    
    /// <summary>
    /// 保质期
    /// </summary>    
    public int? Shelflife { get; set; }
    
    /// <summary>
    /// 保质期单位
    /// </summary>    
    [MaxLength(32, ErrorMessage = "保质期单位字符长度不能超过32")]
    public string? ShelfUnits { get; set; }
    
    /// <summary>
    /// 预警天数（天）
    /// </summary>    
    public int? Earlywarning { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 启用多单位
    /// </summary>    
    public bool? MultiUnitEnabled { get; set; }
    
    /// <summary>
    /// 主单位
    /// </summary>    
    public long? Primaryunit { get; set; }
    
    /// <summary>
    /// 条码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "条码字符长度不能超过32")]
    public string? PrimaryunitBarcode { get; set; }
    
    /// <summary>
    /// 辅助单位
    /// </summary>    
    [MaxLength(1000, ErrorMessage = "辅助单位字符长度不能超过1000")]
    public string? AuxiliaryUnits { get; set; }
    
    /// <summary>
    /// 库存信息
    /// </summary>    
    [MaxLength(1000, ErrorMessage = "库存信息字符长度不能超过1000")]
    public string? InventoryList { get; set; }
    
    /// <summary>
    /// 上传图片
    /// </summary>    
    [MaxLength(2000, ErrorMessage = "上传图片字符长度不能超过2000")]
    public string? UploadImage { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>    
    [MaxLength(2000, ErrorMessage = "上传附件字符长度不能超过2000")]
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>    
    [Required(ErrorMessage = "客户名称不能为空")]
    public long? UserID { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>    
    [Required(ErrorMessage = "供应商不能为空")]
    public long? VendorID { get; set; }
    
}

/// <summary>
/// 货品信息主键查询输入参数
/// </summary>
public class QueryByIdCommodityinformationInput : DeleteCommodityinformationInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataCommodityinformationInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 货品信息数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportCommodityinformationInput : BaseImportInput
{
    /// <summary>
    /// 货品名称
    /// </summary>
    [ImporterHeader(Name = "货品名称")]
    [ExporterHeader("货品名称", Format = "", Width = 25, IsBold = true)]
    public string? ItemName { get; set; }
    
    /// <summary>
    /// 货品编号
    /// </summary>
    [ImporterHeader(Name = "货品编号")]
    [ExporterHeader("货品编号", Format = "", Width = 25, IsBold = true)]
    public string? ItemCode { get; set; }
    
    /// <summary>
    /// 货品类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? GoodsID { get; set; }
    
    /// <summary>
    /// 货品类型 文本
    /// </summary>
    [ImporterHeader(Name = "货品类型")]
    [ExporterHeader("货品类型", Format = "", Width = 25, IsBold = true)]
    public string GoodsFkDisplayName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [ImporterHeader(Name = "规格型号")]
    [ExporterHeader("规格型号", Format = "", Width = 25, IsBold = true)]
    public string? Specifications { get; set; }
    
    /// <summary>
    /// 入库参考价/元
    /// </summary>
    [ImporterHeader(Name = "入库参考价/元")]
    [ExporterHeader("入库参考价/元", Format = "", Width = 25, IsBold = true)]
    public decimal? EnterPrice { get; set; }
    
    /// <summary>
    /// 出库参考价/元
    /// </summary>
    [ImporterHeader(Name = "出库参考价/元")]
    [ExporterHeader("出库参考价/元", Format = "", Width = 25, IsBold = true)]
    public decimal? GooutPrice { get; set; }
    
    /// <summary>
    /// 显示顺序
    /// </summary>
    [ImporterHeader(Name = "显示顺序")]
    [ExporterHeader("显示顺序", Format = "", Width = 25, IsBold = true)]
    public int? DisplayOrder { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public bool? State { get; set; }
    
    /// <summary>
    /// 保质期管理
    /// </summary>
    [ImporterHeader(Name = "保质期管理")]
    [ExporterHeader("保质期管理", Format = "", Width = 25, IsBold = true)]
    public bool? ShelfManagement { get; set; }
    
    /// <summary>
    /// 保质期
    /// </summary>
    [ImporterHeader(Name = "保质期")]
    [ExporterHeader("保质期", Format = "", Width = 25, IsBold = true)]
    public int? Shelflife { get; set; }
    
    /// <summary>
    /// 保质期单位
    /// </summary>
    [ImporterHeader(Name = "保质期单位")]
    [ExporterHeader("保质期单位", Format = "", Width = 25, IsBold = true)]
    public string? ShelfUnits { get; set; }
    
    /// <summary>
    /// 预警天数（天）
    /// </summary>
    [ImporterHeader(Name = "预警天数（天）")]
    [ExporterHeader("预警天数（天）", Format = "", Width = 25, IsBold = true)]
    public int? Earlywarning { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 启用多单位
    /// </summary>
    [ImporterHeader(Name = "启用多单位")]
    [ExporterHeader("启用多单位", Format = "", Width = 25, IsBold = true)]
    public bool? MultiUnitEnabled { get; set; }
    
    /// <summary>
    /// 主单位 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Primaryunit { get; set; }
    
    /// <summary>
    /// 主单位 文本
    /// </summary>
    [ImporterHeader(Name = "主单位")]
    [ExporterHeader("主单位", Format = "", Width = 25, IsBold = true)]
    public string PrimaryunitFkDisplayName { get; set; }
    
    /// <summary>
    /// 条码
    /// </summary>
    [ImporterHeader(Name = "条码")]
    [ExporterHeader("条码", Format = "", Width = 25, IsBold = true)]
    public string? PrimaryunitBarcode { get; set; }
    
    /// <summary>
    /// 辅助单位
    /// </summary>
    [ImporterHeader(Name = "辅助单位")]
    [ExporterHeader("辅助单位", Format = "", Width = 25, IsBold = true)]
    public string? AuxiliaryUnits { get; set; }
    
    /// <summary>
    /// 库存信息
    /// </summary>
    [ImporterHeader(Name = "库存信息")]
    [ExporterHeader("库存信息", Format = "", Width = 25, IsBold = true)]
    public string? InventoryList { get; set; }
    
    /// <summary>
    /// 上传图片
    /// </summary>
    [ImporterHeader(Name = "上传图片")]
    [ExporterHeader("上传图片", Format = "", Width = 25, IsBold = true)]
    public string? UploadImage { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [ImporterHeader(Name = "上传附件")]
    [ExporterHeader("上传附件", Format = "", Width = 25, IsBold = true)]
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 客户名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? UserID { get; set; }
    
    /// <summary>
    /// 客户名称 文本
    /// </summary>
    [ImporterHeader(Name = "*客户名称")]
    [ExporterHeader("*客户名称", Format = "", Width = 25, IsBold = true)]
    public string UserFkDisplayName { get; set; }
    
    /// <summary>
    /// 供应商 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? VendorID { get; set; }
    
    /// <summary>
    /// 供应商 文本
    /// </summary>
    [ImporterHeader(Name = "*供应商")]
    [ExporterHeader("*供应商", Format = "", Width = 25, IsBold = true)]
    public string VendorFkDisplayName { get; set; }
    
}
